Optimal. Leaf size=163 \[ \frac {11 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{8 f}-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {11 a \cot (e+f x)}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 163, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2797, 2725,
3123, 3059, 2851, 2852, 212} \begin {gather*} -\frac {2 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}+\frac {11 a \cot (e+f x)}{8 f \sqrt {a \sin (e+f x)+a}}+\frac {11 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a \sin (e+f x)+a}}\right )}{8 f}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a \sin (e+f x)+a}}{3 f}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a \sin (e+f x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2725
Rule 2797
Rule 2851
Rule 2852
Rule 3059
Rule 3123
Rubi steps
\begin {align*} \int \cot ^4(e+f x) \sqrt {a+a \sin (e+f x)} \, dx &=\int \sqrt {a+a \sin (e+f x)} \, dx+\int \csc ^4(e+f x) \sqrt {a+a \sin (e+f x)} \left (1-2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {\int \csc ^3(e+f x) \left (\frac {a}{2}-\frac {9}{2} a \sin (e+f x)\right ) \sqrt {a+a \sin (e+f x)} \, dx}{3 a}\\ &=-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}-\frac {11}{8} \int \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)} \, dx\\ &=-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {11 a \cot (e+f x)}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}-\frac {11}{16} \int \csc (e+f x) \sqrt {a+a \sin (e+f x)} \, dx\\ &=-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {11 a \cot (e+f x)}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}+\frac {(11 a) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{8 f}\\ &=\frac {11 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{8 f}-\frac {2 a \cos (e+f x)}{f \sqrt {a+a \sin (e+f x)}}+\frac {11 a \cot (e+f x)}{8 f \sqrt {a+a \sin (e+f x)}}-\frac {a \cot (e+f x) \csc (e+f x)}{12 f \sqrt {a+a \sin (e+f x)}}-\frac {\cot (e+f x) \csc ^2(e+f x) \sqrt {a+a \sin (e+f x)}}{3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.07, size = 309, normalized size = 1.90 \begin {gather*} \frac {\csc ^{10}\left (\frac {1}{2} (e+f x)\right ) \sqrt {a (1+\sin (e+f x))} \left (252 \cos \left (\frac {1}{2} (e+f x)\right )-250 \cos \left (\frac {3}{2} (e+f x)\right )-114 \cos \left (\frac {5}{2} (e+f x)\right )+48 \cos \left (\frac {7}{2} (e+f x)\right )-252 \sin \left (\frac {1}{2} (e+f x)\right )+99 \log \left (1+\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (e+f x)-99 \log \left (1-\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (e+f x)-250 \sin \left (\frac {3}{2} (e+f x)\right )+114 \sin \left (\frac {5}{2} (e+f x)\right )-33 \log \left (1+\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (3 (e+f x))+33 \log \left (1-\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (3 (e+f x))+48 \sin \left (\frac {7}{2} (e+f x)\right )\right )}{24 f \left (1+\cot \left (\frac {1}{2} (e+f x)\right )\right ) \left (\csc ^2\left (\frac {1}{4} (e+f x)\right )-\sec ^2\left (\frac {1}{4} (e+f x)\right )\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.37, size = 170, normalized size = 1.04
method | result | size |
default | \(-\frac {\left (1+\sin \left (f x +e \right )\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, \left (48 \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, a^{\frac {7}{2}} \left (\sin ^{3}\left (f x +e \right )\right )-15 \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}\, a^{\frac {7}{2}}+56 \left (-a \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {5}{2}}-33 \left (-a \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {5}{2}} a^{\frac {3}{2}}-33 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{\sqrt {a}}\right ) a^{4} \left (\sin ^{3}\left (f x +e \right )\right )\right )}{24 a^{\frac {7}{2}} \sin \left (f x +e \right )^{3} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(170\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 417 vs.
\(2 (153) = 306\).
time = 0.39, size = 417, normalized size = 2.56 \begin {gather*} \frac {33 \, {\left (\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} - \cos \left (f x + e\right ) - 1\right )} \sin \left (f x + e\right ) + 1\right )} \sqrt {a} \log \left (\frac {a \cos \left (f x + e\right )^{3} - 7 \, a \cos \left (f x + e\right )^{2} + 4 \, {\left (\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 3\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 3\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} - 9 \, a \cos \left (f x + e\right ) + {\left (a \cos \left (f x + e\right )^{2} + 8 \, a \cos \left (f x + e\right ) - a\right )} \sin \left (f x + e\right ) - a}{\cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 1}\right ) + 4 \, {\left (48 \, \cos \left (f x + e\right )^{4} - 33 \, \cos \left (f x + e\right )^{3} - 139 \, \cos \left (f x + e\right )^{2} + {\left (48 \, \cos \left (f x + e\right )^{3} + 81 \, \cos \left (f x + e\right )^{2} - 58 \, \cos \left (f x + e\right ) - 83\right )} \sin \left (f x + e\right ) + 25 \, \cos \left (f x + e\right ) + 83\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{96 \, {\left (f \cos \left (f x + e\right )^{4} - 2 \, f \cos \left (f x + e\right )^{2} - {\left (f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )^{2} - f \cos \left (f x + e\right ) - f\right )} \sin \left (f x + e\right ) + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \cot ^{4}{\left (e + f x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.62, size = 223, normalized size = 1.37 \begin {gather*} \frac {\sqrt {2} {\left (33 \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 192 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + \frac {4 \, {\left (132 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 112 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{3}}\right )} \sqrt {a}}{96 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (e+f\,x\right )}^4\,\sqrt {a+a\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________